﻿<UserControl x:Class="Reactor.Client.Views.CoreView"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:Controls1="clr-namespace:Reactor.Client.Controls" mc:Ignorable="d"
    d:DesignHeight="300" d:DesignWidth="400">

    <Grid x:Name="LayoutRoot" Background="White" Margin="15" Width="180" Height="85">
        <Rectangle RadiusX="5" RadiusY="5" Fill="#f9f9f9" StrokeThickness="1" Stroke="Gray">
            <Rectangle.Effect>
                <DropShadowEffect Color="DarkGray" />
            </Rectangle.Effect>
        </Rectangle>
        <Canvas>
                <StackPanel Orientation="Horizontal">
                    <Image Width="12" Height="12" Margin="5" Source="{Binding Mode=OneWay, Path=StatusImage}" />
                    <TextBlock TextOptions.TextHintingMode="Animated" 
                                Text="{Binding Mode=OneTime, Path=Name}" 
                                FontWeight="Bold" VerticalAlignment="Center" />
                </StackPanel>

                <Grid Margin="0,15,0,0" Width="180" Height="70">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="90" />
                        <ColumnDefinition Width="90" />
                    </Grid.ColumnDefinitions>

                    <Controls1:BorderedImageButton x:Name="ViewServicesButton"
                            ActualCommand="{Binding Mode=OneTime, Path=OpenServicesDialogCommand}"
                            Label="{Binding ServiceCount}" LabelColor="{Binding Mode=OneWay, Path=ServiceCountLabelColor}"
                            HorizontalAlignment="Center" VerticalAlignment="Center"
                            Margin="5" Grid.Column="0"
                            ToolTipService.ToolTip="View services being managed by this Reactor Core"
                            ImageSource="../Images/terminal.png" />
                    <Controls1:BorderedImageButton x:Name="AddServiceButton"
                            ActualCommand="{Binding Mode=OneTime, Path=OpenAdoptionDialogCommand}"
                            HorizontalAlignment="Center" VerticalAlignment="Center"
                            Margin="5" Grid.Column="1"
                            ToolTipService.ToolTip="Adopt new service"
                            ImageSource="../Images/terminal-add.png" />
                </Grid>
            </Canvas>
    </Grid>
</UserControl>
